cmake_minimum_required(VERSION 3.16)
project(demo-svc VERSION 1.0.0 LANGUAGES C CXX)

# Set these variables to build the service as a specific process on a specific machine
set(SVC_NAME "demo-svc")
set(PROC_NAME "demo-svc")

# Threads using pthread
#set(THREADS_PREFER_PTHREAD_FLAG ON)
#find_package(Threads REQUIRED)

# Load and run CMake code from a file or module
include(FindPkgConfig)
include(CMakePackageConfigHelpers)
include(GNUInstallDirs)

include(NOSAL/nosal)
if(NOSAL_TARGET_MACHINE STREQUAL "QNX-SA8155")
    include(NOSAL/toolchain_qnx700_aarch64)
endif()

find_package(nosal-demo-lib REQUIRED)

# Enable tests
if(NOSAL_ENABLE_TESTS)
    message(STATUS "PROJECT MESSAGE: Demo Service tests are enabled")
    #enable_testing()
    add_subdirectory(test)
endif()

add_subdirectory(src)

